<template>
	<view class="history-container">
		<uni-card class="font-text" :is-shadow="false" is-full>
			<text
				class="uni-h6">运动：是一种涉及体力和技巧的一套规则，又有习惯所约束的行为活动，通常具有竞争性。</text>
		</uni-card>
		<uni-list>
				<uni-list-item v-for="(item,index) in dataList" :title="item.timeType" :rightText="item.createTime" :show-badge="true"
					:badge-text="item.time + ''"></uni-list-item>
		</uni-list>
		<view class="bottom-text-box">
			<text>每天动一动，精神一整天！</text>
		</view>
	</view>
</template>

<script>
	import {
		getTimeList,
	} from '@/api/record/time.js'

	export default {
		data() {
			return {
				query: {
					pageSize: 200
				},
				dataList: [],
			}
		},
		onLoad() {
			this.initList();
		},
		methods: {
			initList() {
				var that = this;
				getTimeList(that.query).then(response => {
					that.dataList = response.rows;
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.font-text {
		text-indent: 2em;
	}

	.bottom-text-box {
		background-color: white;
		display: block;
		padding-top: 30px;
		height: 100px;
		text-align: center;
		font-size: 18px;
		color: #1890FF;
		font-weight: bolder;
	}
</style>